package com.qt.pojo.entity.judge;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.qt.pojo.base.BaseDO;
import lombok.*;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @author pgw
 * @version 1.0
 * @description
 * @date Create by 2023/9/20 20:56
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName("judge")
public class Judge  extends BaseDO {

    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 题目id
     */
    private Long problemId;

    private  String username;

    /**
     * 题目展示id
     */
    private String displayProblemId;

    /**
     * 用户uuid
     */
    private String userId;



    /**
     * 提交时间
     */
    private Date submitTime;

    /**
     * 结果码
     */
    private Integer status;

    /**
     * 运行时间
     */
    private Integer time;

    /**
     * 运行内存
     */
    private Integer memory;

    /**
     * 得分
     */
    private Integer score;

    /**
     * 代码长度
     */
    private Integer length;

    /**
     * 代码
     */
    private String code;

    /**
     * 代码语言
     */
    private String language;



    /**
     * 比赛id
     */
    private Long contestId;

    /**
     * 提交者ip
     */
    private String ip;

    /**
     * deleted
     */
    private Integer deleted;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtCreate;


    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtModified;

}
